Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WF to remove-user-cluster #43

Merged
merged 9 commits into from
Mar 8, 2022
Merged

Add WF to remove-user-cluster #43

merged 9 commits into from
Mar 8, 2022

Conversation

robertchoi80
Copy link
Contributor

@robertchoi80 robertchoi80 commented Mar 3, 2022

관련 이슈: openinfradev/decapod-issues#7

workflow 초안 작성 후 admin cluster 에서 테스트 중입니다. -> 테스트 완료!

openinfradev/decapod-flow#77 도 같이 머지되어야 합니다.

@robertchoi80 robertchoi80 changed the title [WIP] Remove user-cluster WF [WIP] Add WF to remove-user-cluster Mar 3, 2022
@robertchoi80
Copy link
Contributor Author

@Jaesang workflow 엔 이상이 없는 거 같은데 계속 lint 에러가 나네요. 혹시 원인이 뭔지 아실까요??

in remove-usercluster WF
@robertchoi80 robertchoi80 force-pushed the remove-usercluster-wf branch 2 times, most recently from 7c5705b to 0f6c0af Compare March 6, 2022 04:34
among csi-driver and k8s-addons
@robertchoi80 robertchoi80 changed the title [WIP] Add WF to remove-user-cluster Add WF to remove-user-cluster Mar 6, 2022
@zugwan
Copy link
Contributor

zugwan commented Mar 7, 2022

create-usercluster-wftpl.yaml 파일 lint 오류는 아래처럼 수정하면 나타나지 않습니다.

diff --git a/tks-cluster/create-usercluster-wftpl.yaml b/tks-cluster/create-usercluster-wftpl.yaml
index 96e67fc..3029dcf 100644
--- a/tks-cluster/create-usercluster-wftpl.yaml
+++ b/tks-cluster/create-usercluster-wftpl.yaml
@@ -33,11 +33,11 @@ spec:
   - name: config
     secret:
       secretName: tks-admin-kubeconfig-secret
-      namespace: argo
+        #namespace: argo
   - name: artifacts
     configMap:
       name: aws-artifacts
-      namespace: argo
+        #namespace: argo
       defaultMode: 0555
   - name: tks-proto-vol
     configMap:

@robertchoi80
Copy link
Contributor Author

@zugwan 말씀하신 내용들 수정했습니다. 근데 지금은 https://github.com/openinfradev/tks-flow/runs/5441868927?check_suite_focus=true 에러가 발생하는데, decapod-flow의 workflow 등 의존성 있는 workflow를 불러오지 못해 에러가 발생하는 걸로 보입니다. fake kubeconfig를 사용해서 생기는 문제인듯 한데, 어떻게든 실제 cluster로부터 workflow들을 읽어올 수 있도록 조치가 필요할 듯 합니다. 싱크때 논의하시죠

@robertchoi80 robertchoi80 force-pushed the remove-usercluster-wf branch 2 times, most recently from 919e740 to 8bef9d6 Compare March 7, 2022 03:04
@robertchoi80
Copy link
Contributor Author

@zugwan @Jaesang @ktkfree 오전에 말씀드린 Lint 관련 이슈는 당장은 해결이 어려울 것 같습니다. 우선은 syntax 에러는 다 잡았으니 현재 코드로 리뷰해주시면 될 것 같습니다.

@ktkfree
Copy link
Contributor

ktkfree commented Mar 7, 2022

delete cluster 전반에 대한 질문입니다.

현재
cluster 생성시에 3개의 argocd app 을 생성하고
. cluster-aws, ebs-csi, kubernetes-addon

lma 생성시에
. sealed-secret
. aws-infrastructure
. ingress-controller
등이 생성됩니다.

지금 작성하신대로라면, cluster 생성시에 생성한 argocd app 3개는 삭제가 되지만, lma 생성시에 생성한 상기 app 들은 '명시적'으로 삭제가되지 않을 것 같은데요.
혹시 어떻게 생각하시는지요

@robertchoi80
Copy link
Contributor Author

LMA 등 서비스 삭제는 user-cluster 삭제 전에 수행된다고 생각했습니다.

클러스터 생성 -> 서비스 생성 -> 서비스 삭제 -> 클러스터 삭제 의 순서로요

제가 질문을 잘 이해한 게 맞나요? '명시적'이라는게 어떤 의미로 말씀하신 건지요?

@robertchoi80
Copy link
Contributor Author

robertchoi80 commented Mar 7, 2022

  • ingress-controller 통합
  • 클러스터 삭제 전에 모든 pvc 삭제

=> 구현 완료

.github/workflows/lint.yml Show resolved Hide resolved
tks-cluster/remove-usercluster-wftpl.yaml Outdated Show resolved Hide resolved
@Jaesang Jaesang self-requested a review March 8, 2022 06:26
- name: app_prefix
value: "{{=sprig.substr(0, 8, workflow.parameters.cluster_id)}}"
- name: filter
value: "app={{=sprig.substr(0, 8, workflow.parameters.cluster_id)}}-{{workflow.parameters.app_group}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 변경이 필요하다고 하지 않으셨나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미 substr 들어가있는데요?

@seungkyua seungkyua merged commit 9ffd24a into main Mar 8, 2022
@seungkyua seungkyua deleted the remove-usercluster-wf branch March 8, 2022 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants